//    Copyright (C) Kherty.  All rights reserved.
using System.Collections.Generic;
using OpenLS.Spreadsheet.UI.Internals;
using OpenLS.Spreadsheet.UI.Internals.Resources;

namespace OpenLS.Spreadsheet.UI
{
    /// <summary>
    /// Interaction logic for MoveOrCopySheetWindow.xaml
    /// </summary>
    partial class MoveOrCopySheetControl
    {
        public MoveOrCopySheetControl(Sheet worksheet)
        {
            Resources.MergedDictionaries.Add(new DialogResources());
            InitializeComponent();
            List<object> items = new List<object>();
            foreach (Sheet o in worksheet.Workbook.Sheets)
                items.Add(o);
            items.Add(UIStringTable.MoveToEnd);

            DataContext = items;
        }
        internal int SelectedIndex{get
        {
            return sheetListBox.SelectedIndex;
        }
            set { sheetListBox.SelectedIndex = value; }
        }
        public bool CreateACopy { get { return createACopyCheckBox.IsChecked.GetValueOrDefault(); } }
    }
}
